package com.youkeda.test.threadpool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author xshuai
 */
public class Main {
    private static final ExecutorService threadPool = Executors.newCachedThreadPool();
    public static int tickCount = 5;

    public static void main(String[] args) {
        TicketMachine w1 = new TicketMachine("Window-1");
        TicketMachine w2 = new TicketMachine("Window-2");
        TicketMachine w3 = new TicketMachine("Window-3");
        threadPool.execute(w1);
        threadPool.execute(w2);
        threadPool.execute(w3);
    }
}
